﻿using Furion.DynamicApiController;
using HOPU.OnlineSchool.Application.Users.Dtos;
using HOPU.OnlineSchool.Application.Users.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HOPU.OnlineSchool.Application.Users
{
   public class UserAppService: IDynamicApiController
    {
        private readonly IUserService _userService;
        public UserAppService(IUserService userService)
        {
            _userService = userService;
        }
        public async  Task<LoginInfoOutput> Login(LoginInfoInput input) {
           return await _userService.LoginAsync(input);
        }

        public UserInfoDto GetInfo()
        {
            var dto = new UserInfoDto()
            {
                Avatar = "",
                Name = "孙悟空",
                Roles = new string[] { "Admin" }

            };

            return dto;
        }
    }
}
